package sk.avicularia.core.data;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import sk.avicularia.core.dao.DocumentTypeDAO;

/**
 * Entita mapujuca strukturu typu dokumentu
 * 
 * @author leaflock
 * @since  0.1
 */
@Entity
@Table(name = DocumentTypeDAO.TABLE_NAME)
public class DocumentType implements Serializable
{

	/**
	 * @see Serializable
	 */
	private static final long	serialVersionUID	= -3672424511352395943L;

	/**
	 * Id zaznamu
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID", nullable = false)
	private Long id;
	
	/**
	 * Nazov daneho typu dokumentu
	 */
	@Column(name = DocumentTypeDAO.COLUMN_NAME, nullable = false, length = 50)
	private String name;
	
	/**
	 * Hodnota daneho typu dokumentu
	 */
	@Column(name = DocumentTypeDAO.COLUMN_VALUE, nullable = false, length = 255)
	private String value;
	
	/**
	 * Description daneho typu dokumentu
	 */
	@Column(name = DocumentTypeDAO.COLUMN_DESCRIPTION, nullable = false, length = 1000)
	private String description = "";

	public Long getId()
	{
		return id;
	}

	public void setId(Long id)
	{
		this.id = id;
	}

	public String getName()
	{
		return name;
	}

	public void setName(String name)
	{
		this.name = name;
	}

	public String getValue()
	{
		return value;
	}

	public void setValue(String value)
	{
		this.value = value;
	}

	public String getDescription()
	{
		return description;
	}

	public void setDescription(String description)
	{
		this.description = description;
	}
}
